// 导入封装的axios
import axios from "../utils/http";
// 导入封装的接口地址
import * as baseURL from "../api/url";

export const allGoods =(data)=>{
    return axios({
        url: baseURL.allGoods_url,
        method: "post",
        data,
    });
};
export const CateCollect =(params)=>{
    return axios({
        url: baseURL.CateCollect_url,
        method: "post",
        params,
    });
};
export const IdCollect =(params)=>{
    return axios({
        url: baseURL.IdCollect_url,
        method: "post",
        params,
    });
};
export const MyCart =(params)=>{
    return axios({
        url: baseURL.MyCart_url,
        method: "post",
        params,
    });
};
export const CartDelete =(params)=>{
    return axios({
        url: baseURL.CartDelete_url,
        method: "get",
        params,
    });
};

export const InsertOrder =(data)=>{
    console.log(data)
    return axios({
        url: baseURL.InsertOrder_url,
        method: "post",
        data,
    });
};

export const allOrder =(params)=>{
    return axios({
        url: baseURL.allOrder_url,
        method: "post",
        params,
    });
};
export const InsertCollect =(data)=>{
    return axios({
        url: baseURL.InsertCollect_url,
        method: "post",
        data,
    });
};
export const InsertCart =(data)=>{
    return axios({
        url: baseURL.InsertCart_url,
        method: "post",
        data,
    });
};
export const UpdateOrder =(data)=>{
    return axios({
        url: baseURL.UpdateOrder_url,
        method: "post",
        data,
    });
};
export const DeleteOrder =(params)=>{
    return axios({
        url: baseURL.DeleteOrder_url,
        method: "post",
        params,
    });
};
export const allWallet =(params)=>{
    return axios({
        url: baseURL.allWallet_url,
        method: "post",
        params,
    });
};
export const UpdateWallet =(data)=>{
    return axios({
        url: baseURL.UpdateWallet_url,
        method: "post",
        data,
    });
};
export const UpdateById =(data)=>{
    return axios({
        url: baseURL.UpdateMoney_url,
        method: "post",
        data,
    });
};
export const addWallet =(data)=>{
    return axios({
        url: baseURL.addWallet_url,
        method: "post",
        data,
    });
};